﻿using System;
using Microsoft.Office.Core;
using Microsoft.Office.Interop.Excel;

namespace YJKRevitBase.ExcelUtility.ModelLayer
{
	public class Shape
	{
		internal Shape(object shape)
		{
			this.m_thisShape = shape;
		}

		public MsoTriState LockAspectRatio
		{
			get
			{
				return (MsoTriState)ExcelUtilityMethod.GetProperty(this.m_thisShape, "LockAspectRatio");
			}
			set
			{
				ExcelUtilityMethod.SetProperty(this.m_thisShape, "LockAspectRatio", new object[]
				{
					value
				});
			}
		}

		public float Width
		{
			get
			{
				return (float)ExcelUtilityMethod.GetProperty(this.m_thisShape, "Width");
			}
			set
			{
				ExcelUtilityMethod.SetProperty(this.m_thisShape, "Width", new object[]
				{
					value
				});
			}
		}

		public float Height
		{
			get
			{
				return (float)ExcelUtilityMethod.GetProperty(this.m_thisShape, "Height");
			}
			set
			{
				ExcelUtilityMethod.SetProperty(this.m_thisShape, "Height", new object[]
				{
					value
				});
			}
		}

		public void CopyPicture()
		{
			ExcelUtilityMethod.UseMethod(this.m_thisShape, "CopyPicture", new object[]
			{
				XlPictureAppearance.xlScreen,
				XlCopyPictureFormat.xlBitmap
			});
		}

		private object m_thisShape;
	}
}
